/*******************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        */
/*                                                                 */
/*  NAME      = frame_cfg.h                                        */
/*  NOTE      =                                                    */
/*  DATE      = 2015/03/24 by yaohl                                */
/*******************************************************************/

#ifndef __FRAME_CFG_H_
#define __FRAME_CFG_H_

//最小时间单位
#define APM_CFG_MIN_TIMEOUT  2

/* 工作目录 */
#define APM_DIR_WORK_TEMP   "../temp"

/* 模块文件目录 */
#define APM_MODULE_WORK_DIR   "../conf/modules"
/* ssl证书目录 */
#define APM_SSL_WORK_DIR      "../conf/ssl_cert"

//更改配置文件路径
#define APM_CFG_FILENAME_APM              "../conf/apm.xml"         /* apm配置文件 */
#define APM_CFG_FILENAME_ZLOG             "../conf/zlog.conf"       /* zlog配置文件 */
#define APM_CFG_FILENAME_ANALYZER         "../conf/analyzer.xml"    /* 协议解析库配置文件 */
#define APM_CFG_FILENAME_SSL              "../conf/ssl.xml"         /* 解密配置文件 */
#define APM_CFG_DIR_LUA                   "../lua"                  /* lua配置文件路径 */

//analyzer.xml
#define APM_CFG_ANALYZER_XPATH_ROOT             "/analyzer"
#define APM_CFG_ANALYZER_XPATH_MODULE           "/analyzer/modules"
#define APM_CFG_ANALYZER_XPATH_L7_DEFAULT       "/analyzer/l7_default"
#define APM_CFG_ANALYZER_XPATH_SERVER_PROTOCOLS "/analyzer/server_protocols"
#define APM_CFG_ANALYZER_XPATH_LUA              "/analyzer/lua"

#define APM_CFG_ANALYZER_KEY_MODULE             "module"
#define APM_CFG_ANALYZER_KEY_DEFAULT            "default"
#define APM_CFG_ANALYZER_KEY_SERVER_PROTOCOLS   "protocol"

//ssl.xml
#define APM_CFG_SSL_XPATH_DSSL              "/dssl_serverinfo"

//apm.xml
#define APM_CFG_MODULE_XPATH_MODULE         "/module"
#define APM_CFG_MODULE_XPATH_ARGS           "/module/args"

#define APM_CFG_MODULE_KEY_MODULE           "module"
#define APM_CFG_MODULE_KEY_FILENAME         "filename"
#define APM_CFG_MODULE_KEY_PROTO            "proto"
#define APM_CFG_MODULE_KEY_ID               "id"
#define APM_CFG_MODULE_KEY_TYPE             "type"
#define APM_CFG_MODULE_KEY_L7_PROTO         "l7_proto"
#define APM_CFG_MODULE_KEY_NAME             "name"
#define APM_CFG_MODULE_KEY_ARG              "arg"
#define APM_CFG_MODULE_KEY_DEFAULT          "default"

//filter
#define APM_CFG_FRAME_XPATH_FILTER          "/apm_frame/filters"
#define APM_CFG_FILTER_KEY_FILTER           "filter"
#define APM_CFG_FILTER_KEY_VLAN             "vlan"

//lua
#define APM_CFG_LUA_KEY_RULE                "lua_rule"

//ssl
#define APM_CFG_SSL_KEY_RULE                "dssl_rule"

//pcap_filter
#define APM_CFG_KEY_PCAP_FILTER             "pcap_filter"

/* 上报线程库 */
#define APM_CFG_FRAME_XPATH_REPORT         "/apm_frame/report"
#define APM_CFG_FRAME_KEY_LIB               "report_lib"
#define APM_CFG_FRAME_KEY_PARAMS            "report_params"
#define APM_CFG_REPORT_KEY_STAT_CONN_TIME   "report_stat_conn_time"
#define APM_CFG_REPORT_KEY_REPORT_ORG_CONN  "report_org_conn"

#endif
